#ifndef KEYThREAD_H
#define KEYThREAD_H

//#include "tools/i2cled.h"
#include <time.h>
#include <stdio.h>
#include <sys/time.h>
#include <poll.h>
#include "gpio.h"
#include "i2cled.h"
#include "platform.h"
#include "queue.h"
#include "camera.h"
#include "osa.h"

extern int KEY_A_SHORT;
extern int KEY_A_LONG;
extern int KEY_B_SHORT;
extern int KEY_B_LONG;

#define KEY_UP_SHORT        0b00000001       //1
#define KEY_DOWN_SHORT      0b00000010       //2
#define KEY_LEFT_SHORT      0b00000100       //4
#define KEY_RIGHT_SHORT     0b00001000       //8
#define KEY_OK_SHORT        0b00010000       //16
#define KEY_MENU_SHORT      0b00100000       //32
#define KEY_UP_LONG         0b01000001       //65
#define KEY_DOWN_LONG       0b01000010       //66
#define KEY_LETF_LONG       0b01000100       //68
#define KEY_RIGHT_LONG      0b01001000       //72
#define KEY_OK_LONG         0b01010000       //80
#define KEY_MENU_LONG       0b01100000       //96

void MOTOU_PIN_INIT();                       //初始化马达管脚
void * keythread_run(void *pArgs);
#endif
